Sandbox Logo

Sandbox.Utility.CircularBuffer<T>.ToArraySegments

Description

Get the contents of the buffer as 2 ArraySegments. Respects the logical contents of the buffer, where each segment and items in each segment are ordered according to insertion. Fast: does not copy the array elements. Useful for methods like <c>Send(IList&lt;ArraySegment&lt;Byte&gt;&gt;)</c>. <remarks>Segments may be empty.</remarks>

Return

An IList with 2 segments corresponding to the buffer content.

User Comments